<template>
	<div class="container">
		<div class="subTitle">
			<div class="list">
				<template  v-for="(item, key) in list" >
					<!-- <slide-left @delItem="delChat" :data_transit="item">
						
					</slide-left> -->
					<div class="item" @click="toDetail(item.id,item.type)">
						<div class="avatar">
							<image v-if="item.type == 1" src="/static/notice/xiaoxitixin.png" mode="aspectFill"></image>
							<image v-if="item.type == 2" src="/static/notice/tianjia.png" mode="aspectFill"></image>
							<image v-if="item.type == 4" src="/static/notice/jju.png" mode="aspectFill"></image>
							<image v-if="item.type == 3" src="/static/notice/tongguo.png" mode="aspectFill"></image>
							<image v-if="item.type == 5" src="/static/notice/xiaoxi.png" mode="aspectFill"></image>
							<image v-if="item.type == 6" src="/static/notice/dianzan.png" mode="aspectFill"></image>
							<div class="unread" v-if="!item.isRead"></div>
						</div>
						<div class="info">
							<div class="title">
								<div class="nickname">{{ item.title }}</div>
								<div class="time">{{ item.createTime }}</div>
							</div>
							<div class="desc">{{ item.subTitle  }} </div>
						</div>
					</div>
				</template>
				
			</div>
		</div>
		<div class="content" v-show="list.length<1">
			<empty title="暂无消息" setSrc="/static/icons/userNot.png"></empty>
		</div>
	</div>
</template>

<script>
import data from '@/js/my/notice/data.js';
import methods from '@/js/my/notice/methods.js';
import { mapState } from 'vuex';
import navigationBar from '../../components/navigationBar.vue';
import slideLeft from '../../components/slideLeft/slideLeft.vue';
import empty from '../../components/empty.vue';
export default {
	data,
	methods,
	onLoad() {
		
	},
	onShow() {
		this.page = 1
		this.list = []
		this.getPageList()
	},
	onHide() {},
	components: {
		slideLeft,empty
	},
	computed: {
		...mapState(['navigationBarHeight'])
	},
	onPullDownRefresh() {
		this.page = 1
		this.list_rows = 10
		this.list = []
		this.getPageList()
		uni.stopPullDownRefresh()
	},
	onReachBottom() {
		this.getPageList()
	}
};
</script>
<style scoped lang="scss">
	@import '~@/style/my/notice.scss';
</style>
